<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="js/echarts.min.js"></script>
</head>
<body>

<div id="main" style="width: 600px;height:400px;"></div>

<script th:inline="javascript">

    var myChart = echarts.init(document.getElementById('main'));

    var dateStr = [[${xList}]];
    var confirmStr = [[${yList}]];


    var option = {
        title: {
            text: '本土新增确诊趋势'
        },
        tooltip: {},
        legend: {
            data: ['本土新增确诊趋势']
        },
        xAxis: {
            data: dateStr
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name: '确诊',
                type: 'line',
                data: confirmStr
            }
        ]
    };

    myChart.setOption(option);
</script>

</body>
</html>